home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Columbia Kermit
/
kermit.zip
/
newsgroups
/
misc.19941221-19950208
/
000110_news@columbia.edu_Sat Jan 7 21:26:44 1995.msg
< prev
next >
Wrap
Internet Message Format
|
2020-01-01
|
7KB
Received: from apakabar.cc.columbia.edu by watsun.cc.columbia.edu with SMTP id AA08027
(5.65c+CU/IDA-1.4.4/HLK for <kermit.misc@watsun.cc.columbia.edu>); Sat, 7 Jan 1995 16:26:48 -0500
Received: by apakabar.cc.columbia.edu id AA22407
(5.65c+CU/IDA-1.4.4/HLK for kermit.misc@watsun); Sat, 7 Jan 1995 16:26:47 -0500
Path: news.columbia.edu!watsun.cc.columbia.edu!fdc
From: fdc@watsun.cc.columbia.edu (Frank da Cruz)
Newsgroups: comp.protocols.kermit.misc
Subject: Re: [?] Backspace key says, "^?"
Date: 7 Jan 1995 21:26:44 GMT
Organization: Columbia University
Lines: 122
Message-Id: <3en0uk$ls5@apakabar.cc.columbia.edu>
References: <D201pG.DMB@indirect.com>
Nntp-Posting-Host: watsun.cc.columbia.edu
Cc:
In article <D201pG.DMB@indirect.com>, Jim Monty <monty@indirect.com> wrote:
>DISCLAIMER: I've looked for the answer to the following question in
> _Using MS-DOS Kermit_ and in the documentation included
> with MS-DOS Kermit 3.13. I either couldn't find the
> answer or didn't understand it if I did.
>
Thank you for consulting the documentation.
>I'm using MS-DOS Kermit 3.13 on an i80386SX machine running MS-DOS 6.0,
>using a 14,400 bps Zoom VFP V.32bis modem. Kermit is set for VT220
>terminal emulation and is using the Latin1 character set and code page
>CP437. I've not mucked with much in the initialization files, so you may
>assume that any other parameters are still set to the "factory" defaults.
>
>Alas, the question: In some online environments, my backspace key behaves
>as one would expect it to. In others, hitting the backspace key results
>in either (1) nothing happening, or (2) the characters "^?" appearing on
>the screen. I can, however, use Ctrl-H in these situations. In these
>exact same online environments (e.g., vi insert mode when connected to my
>dial-up UNIX shell account) under analagous circumstances, the other
>terminal emulator that I use, Telemate Version 3.12, does not behave this
>way. The backspace key functions as a destructive backspace.
>
>I presume that the change I need to make to my MS-DOS Kermit
>configuration is a simple one, but I can't figure it out. And I've never
>really wanted to bother to spend a lot of time trying to figure it out
>myself. (I want the magic straight from the wizards' minds.) Thanks, in
>advance, for taking the time to help me.
>
>Jim Monty, Kermit Cheerleader at Arthur Andersen LLP
>
Well, Jim, I think it's finally time to classify this as a Frequently
Asked Question and add it to the FAQ (kermit.columbia.edu:kermit/FAQ.TXT).
As you have discovered, different hosts and applications use different
characters (or sequences) for destructive backspace. The terminal
emulator, Kermit or otherwise (including Telemate -- if its backspace key
works for you in all circumstances, I think that's just a stroke of luck),
has no way of knowing what host or application you are using, and
therefore no way of knowing what to send when you press the Backspace key.
Of course, Kermit's Backspace key must send *something* "out of the box",
so it uses one of the several most likely destructive backspace values,
and in fact the one that is defined in ASCII to be destructive backspace,
namely Rubout, also known as Delete or DEL, character number 127, which
sometimes is displayed as "^?". Lest anyone believe this is a frivolous
choice, I quote from American National Standard X3.4-1977, Section 5.1,
Control Characters:
0/8 BS (Backspace). A one-active-position format effector that moves
the position backward on the same line.
7/15 (DEL). A character used primarily to erase or obliterate an
erroneous or unwanted character...
In cases where the default does not work, Kermit lets you redefine the
Backspace key (or any other key) to send whatever you want it to send (or
to take any other actions) with the SET KEY command.
The SET KEY command has two operands: a unique identifier for a key or key
combination, called a scan code, and the value or action to be assigned to
the key. Scan codes are written with a preceding backslash (\). The scan
code for the Backspace key is \270. The default definition for this key
is \127, meaning the character whose numeric value is 127, i.e. DEL.
You can find out a key's scan code by consulting Table I-9 in the manual
(pages 285-288), or by giving the SHOW KEY command to Kermit and then
pressing the desired key or key combination.
Now, as you have discovered, some applications use Ctrl-H -- ASCII BS
(Backspace) -- for destructive backspace. Consulting the ASCII table on
page 275, you see that the ASCII code for BS is 8. So to make PC's
Backspace key send BS instead of DEL, give this command:
SET KEY \270 \8
If you use Kermit only to connect to hosts and services that use BS for
destructive backspace, then you can put this command in your MSCUSTOM.INI
file, and it will take effect automatically every time you start Kermit.
But some people (like yourself) switch between different hosts and/or
services that expect different characters or sequences for destructive
backspace. You can, of course, give Kermit the appropriate command
every time you switch from one to another:
SET KEY \270 \8 ; Backspace sends BS
or:
SET KEY \270 \127 ; Backspace sends DEL
or you can use the macros that are already defined in MSKERMIT.INI for
this. In version 3.14, for example, we have macros with names like
VAX and IBM. The VAX macro sets things up (including the Backspace key)
for communicating with VAXes and VAX-like systems, and that means, among
other things, setting the Backspace key to send DEL. The IBM macro, on
the other hand, is used for communicating with IBM mainframes in linemode,
where BS is used.
You can use these macros as they are, or you can write your own macros
based upon them and add them to your MSCUSTOM.INI file. To use a macro,
just type its name at the MS-Kermit> prompt.
Suppose, for example, you normally access two different systems: a BBS
(which uses 8-bit characters, ANSI terminal emulation, and BS) and a UNIX
system (which uses 7-bit characters, VT220 emulation, and DEL), and these
items need to be changed when you switch between the two. You could write
two macros such as these:
define bbs set term byte 8, set term type ANSI, set key \270 \8
define unix set term byte 7, set term type vt220, set key \270 \127
And then each time you want to use the BBS, you just type "bbs" at the
MS-Kermit> prompt, and each time you want to access the UNIX system,
you type "unix".
Of course, you could take this process even further, and turn the BBS and
UNIX macros into complete connection-establishment and login scripts,
following the directions in Chapter 14 of the manual, on script
programming.
- Frank